<?php

class Photo extends Controller {
	
	function Photo()
	{
		//Constructor  
		parent::Controller();
		$this->load->model('usermodel');
		$this->load->model('friendsmodel');
		$this->load->model('wallmodel');
		$this->load->model('uploadmodel');
		$this->load->model('photomodel');
		$this->load->library('form_validation');
	}
	
	function id()
	{
	
		$photo = $this->photomodel->getUserPhoto($this->uri->segment(3));		
		$data['titlebar'] = $photo[0]['location'] . "&nbsp;" . $photo[0]['detail'];
		$data['photoUser'] = $photo[0]['user_id'];
		$data['photoDatetime'] = $photo[0]['datetime'];
		$data['photoCaption'] = $photo[0]['caption'];
		$data['photoLat'] = $photo[0]['latitude'];
		$data['photoLng'] = $photo[0]['longitude'];
		$data['photoLoc'] = $photo[0]['location'];
		$data['photoDetail'] = $photo[0]['detail'];
		$this->load->view('user_photo_view', $data);
	}
	
}
